package be.darling.scrt.statistics;

/**
 * Created by IntelliJ IDEA.
 * User: geert
 * Date: Nov 22, 2007
 * Time: 1:57:07 PM
 * To change this template use File | Settings | File Templates.
 */
public class Means  {

    double sumX;
    double ssX;
    int n;

    public Means() {
    }

    public void add(double value){
        n++;
        sumX += value;
        ssX += (value*value);
    }

    public double getSumX() {
        return sumX;
    }

    public double getSsX() {
        return ssX;
    }

    public int getN() {
        return n;
    }

    public double getMean(){
        return sumX/n;
    }
    
}
